package io.a.utils;

import io.a.domain.Db;

import static io.a.utils.Const.*;

public class H {
    public static final Db DB = init();

    private static Db init() {
        PropKit.useFirstFound("application-prod.properties", "application-test.properties", "application-dev.properties");
        String driver = PropKit.get(DRIVER);
        String url = PropKit.get(URL);
        String user = PropKit.get(USER);
        String password = PropKit.get(PASSWORD);
        return new Db(driver, url, user, password);
    }
}
